<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/jsp/common/headMain.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
  <head>
    <title>选择地区</title>
	<script type="text/javascript">
	$(function(){
		$.fn.zTree.init($("#_showAddressTreeRD"), {
			data : {
				key : {
					name : "name"
				},
				simpleData : {
					enable : true,
					idKey : "id",
					pIdKey : "parentid"
				}
			},
			async : {
				enable : true,
				url : jQuery.getBasePath() + "/address_getAddressTree",
				autoParam : [ "id" ],
				dataType : "json",
				type : "post"
			},
			check : {
				enable : false,
				chkStyle : "radio",
				radioType : "level"
			},
			callback : {
				onClick : function(event, treeId, treeNode) {
					$("#a_addressID").val(treeNode.id);
					$("#a_addressNAME").val(treeNode.name);
					if ($("#m_address_name")) {
						$("#m_address_name").val(treeNode.name);
					}
				}
			}
		});
	});
	//关闭单选树的div
	function closeTreeDiv() {
		$('#_addressTreeRD').dialog('close');
	}
	</script>
<body>
	<div class="choose_tree">
		<ul id="_showAddressTreeRD" class="ztree"></ul>
		<strong><em class="okIcon"></em><input onclick="closeTreeDiv();" type="button" value="确定" /></strong>
	</div>
</body>
</html>	
